<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('game_login_config', function (Blueprint $table) {
            $table->engine  = 'InnoDB';
            $table->comment('游戏登录配置');

            $table->increments('id');
            $table->integer('create_time')->comment('创建时间')->unsigned()->default(0);
            $table->integer('game_id')->comment('游戏id')->unsigned()->default(0);
            $table->tinyInteger('need_idcard')->comment('是否要实名 1是')->unsigned()->default(1);
            $table->tinyInteger('show_bind_phone')->comment('是否弹出绑定手机 1是')->unsigned()->default(0);

            $table->unique('game_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('game_login_config');
    }
};
